TSGetContingencyResults Function

 

TSGetCongencyResults function

The TSGetContingencyResults function is used to read transient stability results into an external program (i.e. Matlab or VB) using SimAuto.

This function is analogous to the script command TSGetResults, where rather than saving out results to a file, the results are passed back directly to the SimAuto COM object and may be further processed by an external program. As with TSGetResults, this function should only be used after the simulation is run (for example, use this after running script commands TSSolveAll or TSSolve).

Function Prototype

TSGetContingencyResults(CtgName, ObjFieldList, StartTime, StopTime)

 

Parameter Definitions

CtgName : String The contingency to obtain results from. Only one contingency be obtained at a time.

ObjFieldList: VariantA variant array of strings which may contain plots, subplots, or individual object/field pairs specifying the result variables to obtain.

StartTime : String The time in seconds in the simulation to begin retrieving results. If not specified, the start time of the simulation is used.

StopTime : String The time in seconds in the simulation to stop retrieving results. If not specified, the end time of the simulation is used.

 

Output

The SimAuto output for this function is a Variant which contains three levels. Output(0) displays an error message, if any. Output(1) displays the header which describes the variables that were saved out. Output(2) displays the time series data (numerical results from simulation), corresponding to the variables described in the header. MATLAB indexing begins at 1 instead of 0, so add one to all the indices shown when using MATLAB.